/**
 * 
 */
package com.fish.service.impl.user;

import java.util.List;
import java.util.Map;

import com.fish.common.constant.QueryPage;
import com.fish.common.tag.Pager;
import com.fish.service.user.UserService;
import com.fish.user.dao.UserDao;
import com.fish.user.po.User;

/**
 * @author damian
 *
 */
public class UserServiceImpl implements UserService {
	private UserDao userDao;

	@Override
	public Pager<User> selectUserWithPaging(Map<String, Object> param) {
		return userDao.selectUserWithPaging(param);
	}

	@Override
	public Long insertUser(User user) {
		return userDao.insertUser(user);
	}

	@Override
	public User selectUserById(String id) {
		return userDao.selectUserById(id);
	}

	@Override
	public boolean updateUser(User user) {
		return userDao.updateUser(user);
	}

	@Override
	public boolean deleteUser(String id, String updateUserId) {
		return userDao.deleteUser(id, updateUserId);
	}

	/**
	 * 获取userDao 
	 */
	public UserDao getUserDao() {
		return userDao;
	}

	/**
	 * @param userDao the userDao to set
	 */
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public Long queryUserCountByObject(User user) {
		return this.userDao.queryUserCountByObject(user);
	}

	@Override
	public List<User> queryUserByObject(User user, QueryPage queryPage) {
		return this.userDao.queryUserByObject(user,queryPage);
	}

	@Override
	public User getUserByUser(User user) {
		return this.userDao.getUserByUser(user);
	}
}
